package work20241203_chap6oop.r_demo15;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

/**
 * @author zdl
 * @date 2024/12/5
 */
public class Employee {
    private String name;
    private int month;
    LocalDate currentDate = LocalDate.now();
    // 使用 DateTimeFormatter 格式化日期
    DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM");
    String currentMonth = currentDate.format(formatter);
    public Employee() {
    }

    public Employee(String name, int month) {
        this.name = name;
        this.month = month;
    }

    public double getSalary(int month){
        return 0;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return month
     */
    public int getMonth() {
        return month;
    }

    /**
     * 设置
     * @param month
     */
    public void setMonth(int month) {
        this.month = month;
    }

    public String toString() {
        return "Employee{name = " + name + ", month = " + month + "}";
    }
}
